//
//  NUserModel.m
//  News
//
//  Created by zhangtao on 2018/11/14.
//  Copyright © 2018 zt.td. All rights reserved.
//

#import "NUserModel.h"

@implementation NUserModel


static NUserModel *model = nil;

+(instancetype)shareInstance{
    static dispatch_once_t onceToken;
    dispatch_once(&onceToken, ^{
        model = [[NUserModel alloc]init];
    });
    return model;
}

-(void)initWithDic:(NSDictionary *)dic{
    [model setValuesForKeysWithDictionary:dic];
}

-(void)setValue:(id)value forUndefinedKey:(NSString *)key{
    
}

-(void)saveLocal:(NSDictionary *)dic{
    NSArray *arr = [dic allKeys];
    for (NSString *key in arr) {
        [[NSUserDefaults standardUserDefaults] setValue:dic[key] forKey:key];
    }
}

@end
